package com.szxy.miaosha.dao;

import com.szxy.miaosha.domain.Users;
import org.apache.ibatis.annotations.Insert;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;

import java.util.List;

/**
 * @Auther:wzer
 * @Date:2020/9/5
 * @Description:com.szxy.miaosha.dao
 * @Version:1.0
 **/
@Mapper
public interface UserDao {


    @Select("select * from user")
    List<Users> selectAll();

    @Select("select * from user where id = #{id}")
    Users selectUserById(@Param("id") int id);

    @Insert("insert into user values(#{id}, #{name})")
    int insertUser(Users user);
}
